//
//  STFTempViewController.swift
//  高仿新浪微博
//
//  Created by 沈腾飞 on 2017/1/18.
//  Copyright © 2017年 shen. All rights reserved.
//

import UIKit

class STFTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        
    }
    //设置视图
    func setupUI () {
        
        view.backgroundColor = STFRandomColor()
        setupUI()
        
    }
    //设置导航
    func setupNav () {
        
        //设置titl
        title = "第\(navigationController?.childViewControllers.count ?? 0)个控制器"
    
        //如果自定义了左侧的返回按钮 从屏幕左侧滑动就会失效
        
        //设置右侧按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(imgName: nil, title: "PUSH", target: self, action: #selector(rightBtnClick))
        
    }
    
    
    
    //右边按钮的点击事件
    @objc func rightBtnClick () {
        print("右边按钮的点击事件")
        let tempVc = STFHomeViewController()
        navigationController?.pushViewController(tempVc, animated: true)
    }

}
